<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    .top {
      width: 100%;
      height: 100px;
      background-color: honeydew;
      text-align: center;
    }

    .middle {
      height: 500px;
      background-color: khaki;
      display: flex;
    }
    .left {
      width: 100px;
      background-color: lightgreen;
    }
    .right {
      flex: 1;
    }
    .bottom {
      height: 100px;
      background-color: pink;
      text-align: center;
    }
  </style>
</head>

<body>
  <div id="app">
    <v-top></v-top>
    <v-middle></v-middle>
    <v-bottom></v-bottom>
  </div>
  <template id="top">
    <div class="top">
      <p>上中下三层结构，中层分为左右结构</p>
    </div>
  </template>
  <template id="middle">
    <div class="middle">
      <v-left></v-left>
      <v-right></v-right>
    </div>
  </template>
  <template id="bottom">
    <div class="bottom">
      我是有底线的
    </div>
  </template>
  <template id="left">
    <div class="left">
      <ul>
        <li>首页</li>
        <li>详情页</li>
        <li>购物车</li>
        <li>我的</li>
      </ul>
    </div>
  </template>
  <template id="right">
    <div class="right">
      <p>我是很多文字...我是很多文字...我是很多文字...我是很多文字...</p>
    </div>
  </template>
  <script src="../vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data() {
        return {

        }
      },
      components: {
        'vTop': {
          template: '#top'
        },
        'vMiddle': {
          template: '#middle',
          components: {
            'vLeft': {
              template: '#left'
            },
            'vRight': {
              template: '#right'
            }
          }
        },
        'vBottom': {
          template: '#bottom'
        }
      }
    })
  </script>
</body>

</html>